<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位法三栏布局</title>
    <style>
        body{
            position: relative;
            height:500px;
        }
        .left{
            position: absolute;
            top:0;
            left:0;
            width:100px;
            background-color: pink;
            height:100%;
        }
        .right{
            position: absolute;
            top:0;
            right:0;
            width:100px;
            background-color: deeppink;
            height:100%
        }
        .main{
            background-color: black;
            height:100%;
            margin-left:100px;
            margin-right: 100px;
        }
    </style>
</head>
<body>
<div class="left"></div>
<div class="main"></div>
<div class="right"></div>
</body>
</html>